#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: db_info_v152.py 
@version:
@time: 2022/05/13 
"""
from TapDataSourceInfo.db_info_v124 import *
from TapDataSourceInfo.db_info_v124 import source, target, source_and_target
from TapDataSourceInfo.db_info_v124 import source_db, target_db, source_and_target_db

__all__ = [
    'Mysql',
    'Oracle',
    'MongoDB',
    'DB2',
    'Postgres',
    'Sqlserver',
    'Gbase8s',
    'Sybase',
    'GaussDB200',
    'ES',
    'Redis',
    'Kafka',
    'MariaDB',
    'MysqlPXC',
    'Jira',
    'DM',
    'Hive',
    'TCPIP',
    'MQ',
    'HBase',
    'KUDU',
    'Greenplum',
    'TiDB',
    'HANA',
    'KunDB',
    'ClickHouse',
    'Vika',
    'Doris',
    'GridFS',
    'File',
    'Dummy',
    'CustomConnection'
]


class TiDB:
    database_type = 'tidb'

    AUTO_TIDB_SOURCE = {
        "name": "AUTO_TIDB_SOURCE",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "4000",
        "database_name": source_db,
        "database_username": "root",
        "plain_password": "",
        "connection_type": source,
        'tidbPdServer': "http://192.168.1.183:2379"
    }
    AUTO_TIDB_TARGET = {
        "name": "AUTO_TIDB_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "4000",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "",
        "connection_type": target,
        'tidbPdServer': "http://192.168.1.183:2379"
    }
    AUTO_TIDB_SOURCE_AND_TARGET = {
        "name": "AUTO_TIDB_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "4000",
        "database_name": source_and_target_db,
        "database_username": "root",
        "plain_password": "",
        "connection_type": source_and_target,
        'tidbPdServer': "http://192.168.1.183:2379"
    }


class KunDB:
    database_type = 'kundb'
    # 没有可用的kundb数据源，使用mysql替代
    AUTO_KUNDB_SOURCE = {
        "name": "AUTO_KUNDB_SOURCE",
        "database_type": database_type,
        "database_host": "47.115.163.10",
        "database_port": "3306",
        "database_name": "kundb",
        "database_username": "root",
        "plain_password": "zsj@520wm",
        "connection_type": source
    }
    AUTO_KUNDB_TARGET = {
        "name": "AUTO_KUNDB_TARGET",
        "database_type": database_type,
        "database_host": "47.115.163.10",
        "database_port": "3306",
        "database_name": "kundb_target",
        "database_username": "root",
        "plain_password": "zsj@520wm",
        "connection_type": target
    }
    AUTO_KUNDB_SOURCE_AND_TARGET = {
        "name": "AUTO_KUNDB_SOURCE_AND_TARGET",
        "database_type": database_type,
        "database_host": "47.115.163.10",
        "database_port": "3306",
        "database_name": "kundb_public",
        "database_username": "root",
        "plain_password": "zsj@520wm",
        "connection_type": source_and_target
    }


class ClickHouse:
    database_type = 'clickhouse'

    AUTO_CLICKHOUSE_TARGET = {
        "name": "AUTO_CLICKHOUSE_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        'python_port': '9002',
        "database_port": "9123",
        "database_name": target_db,
        "database_username": "default",
        "plain_password": "Gotapd8!!",
        "connection_type": target
    }


class Vika:
    database_type = 'vika'
    vika_host = "https://api.vika.cn/fusion/v1"

    AUTO_VIKA_TARGET = {
        "name": "AUTO_VIKA_TARGET",
        "database_type": database_type,
        "database_host": vika_host,
        "charset": "",
        "connection_type": target,
        "database_password": 'b0275b0ea5d9f94ca737c623b5930e24fe799d0fd2b63dec2d52748cd7281fae',
        "vika_space_id": "spclBY86LmKGW",
        "vika_space_name": ""
    }


class Doris:
    database_type = "doris"

    AUTO_DORIS_TARGET = {
        "name": "AUTO_DORIS_TARGET",
        "database_type": database_type,
        "database_host": "192.168.1.183",
        "database_port": "9030",
        "database_name": target_db,
        "database_username": "root",
        "plain_password": "",
        "connection_type": target
    }
